﻿<local:BaseLab x:Class="Rxx.Labs.Reactive.Networking.SocketLab"
							 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
							 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
							 xmlns:local="clr-namespace:Rxx.Labs"
							 xmlns:labs="clr-namespace:DaveSexton.Labs;assembly=DaveSexton.Labs"
							 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
							 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
							 mc:Ignorable="d"
							 d:DesignHeight="300" d:DesignWidth="400"
							 DataContext="{Binding RelativeSource={RelativeSource Self}}">

	<labs:OutOfBrowserContentControl>

		<Grid>
			<Grid.RowDefinitions>
				<RowDefinition Height="Auto" />
				<RowDefinition Height="Auto" />
				<RowDefinition />
			</Grid.RowDefinitions>
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="Auto" />
				<ColumnDefinition />
			</Grid.ColumnDefinitions>

			<TextBlock Grid.Row="0" Grid.Column="0" Margin="6 10 6 10"
								 VerticalAlignment="Center" HorizontalAlignment="Right"
								 Text="Host Name or IP Address:" />

			<TextBox Grid.Row="0" Grid.Column="1" Margin="6 10 6 10"
							 VerticalAlignment="Center"
							 Text="{Binding HostNameOrIPAddress, Mode=TwoWay}" />

			<TextBlock Grid.Row="1" Grid.Column="0" Margin="6 0 6 10"
								 VerticalAlignment="Center" HorizontalAlignment="Right"
								 Text="Port:" />

			<TextBox Grid.Row="1" Grid.Column="1" Margin="6 0 6 10"
							 VerticalAlignment="Center"
							 Text="{Binding Port, ValidatesOnExceptions=True, Mode=TwoWay}" />

			<StackPanel Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2"
									VerticalAlignment="Top" HorizontalAlignment="Center">

				<Button Margin="0 0 0 10" Padding="10" MinWidth="150"
								IsEnabled="{Binding IsCommunicating, Converter={StaticResource InverseBooleanConverter}}"
								Content="Get HTTP Options"
								Click="GetHttpOptions" />

				<Button Padding="10" MinWidth="150"
								IsEnabled="{Binding IsCommunicating}"
								Content="Cancel"
								Click="Cancel" />

			</StackPanel>

		</Grid>

	</labs:OutOfBrowserContentControl>

</local:BaseLab>